/* -----------------------------------------------------
 iCompose
 TimeSignature.m
 
 Created by Team: THE BEARD on 31/10/09.
 Members who contributed to this file:
 1. Ethan Holmes
 
 List of changes to previous member:
 Version 1:
 Oct 31, 2009 (Ethan)
 - implemented initTime, Encode / Decode methods
 
 Simon Fraser University, 2009.
 ----------------------------------------------------- */

#import "TimeSignature.h"


@implementation TimeSignature

@synthesize numberOfBeats;
@synthesize beatValue;

/*
 Initializes the number of beats per bar, and the value of each beat.
 */
-(void)initTime:(int)beat andValue:(int)value{
	numberOfBeats = beat;
	beatValue = value;
}

-(id)initWithCoder:(NSCoder*)coder{
	numberOfBeats = [coder decodeIntForKey:@"numberOfBeats"];
	beatValue = [coder decodeIntForKey:@"beatValue"];
	return self;
}

-(void)encodeWithCoder:(NSCoder*)encoder{
	[encoder encodeInt:numberOfBeats  forKey:@"numberOfBeats"];
	[encoder encodeInt:beatValue forKey:@"beatValue"];
}

@end
